<template>
    <div>   
        首页
    </div>
</template>

<script setup lang="ts">
import router from "@/router";
import {onMounted} from 'vue'
import {useRouter} from 'vue-router'
import { formatRoutes } from "@/utils/dealRouter";
// const pageRouter=useRouter()
let arr:Array<object>=JSON.parse(localStorage.getItem('viteMenu') as string)
onMounted(()=>{
    return
    let route:Array<object>=formatRoutes(arr,true) as[]
    console.log(route);
    
    // return
    route.forEach((item:any,idx:number)=>{
        // console.log(idx);
        router.addRoute(item)
    })
    console.log(router.getRoutes());
})

</script>

<style scoped>

</style>